from typing import List
from abc import ABC, abstractmethod
import  pandas as pd

class DataFilter(ABC):
    @abstractmethod
    def filter(self, data):
        pass
    
class JSLDataFilter(DataFilter):
    def filter(self, data):
        data = data["data"]
        return data

class DataPipeline:
    def __init__(self):
        self.filters: List[DataFilter] = []

    def add_filter(self, filter: DataFilter):
        self.filters.append(filter)
        return self

    def process(self, raw_data):
        processed = raw_data
        processed = processed["data"]
        processed = pd.DataFrame(processed)

        # for filter in self.filters:
            # processed = filter.filter(processed)
        return processed